// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

THREAD "CSD"

model.Load(#bfypro)
model.Load(#hfypro)
model.Load(#sbfypro)
model.Load(#swfopro)
model.Load(#WFYSEX)
038b:
        
22@ = 0
23@ = 0
4@ = 0
0@ = 0
WHILE TRUE
    WAIT 0
    Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)                                                                                                                             
    if 0AE1: 4@ = random_actor_near_point 1@ 2@ 3@ in_radius 80.0 find_next 1 pass_deads 0 //IF and SET                                                                  
    jf @continuet                                                                                                                                                                  
    IF NOT 4@ == -1                                                                                                                                                   
    jf @continuet                                                                                                                                                          
    IF 056D:   actor 4@ defined                                                                                                                                   
    jf @continuet
    0665: get_actor 4@ model_to 0@
    if or
       0@ == #lapd1                                                                                                                                       
       0@ == #sfpd1                                                                                                                                                           
       0@ == #lvpd1                                                                                                                                                           
       0@ == #csher                           
       0@ == #lapdm1                          
       0@ == #fbi                             
       0@ == #army                            
       0@ == #swat                            
    jf @continuet
    if 0449:   actor 4@ in_a_car
    then
        5@ = actor.CurrentCar(4@)
        if 056E:   car 5@ defined
        then 
            01E9: 14@ = car 5@ num_passengers
            14@ -= 1 
            046C: 6@ = car 5@ driver
            IF 056D:   actor 6@ defined                                                                                                                                   
            then
                actor.RemoveReferences(6@)
                actor.DestroyInstantly(6@)
                10@ = Actor.CreateAsDriver(prostitute, #bfypro, 5@)
                0AB3: 446 > 10@ //SEND HANDLER
                
                0AB1: call_scm_func @startNewThread 1 labelName @COPS_HANGE_3   
            end
            25@ = car.Model(5@)
            if not 25@ == #rhino
            then
                for 0@ = 0 to 14@ step 1                                                                      
                    0209: 17@ = random_int_in_ranges 1 5                                                      
                    if 17@ == 1                                                                               
                    then 18@ = #bfypro                                                                        
                    end                                                                                       
                    if 17@ == 2                                                                               
                    then 18@ = #hfypro                                                                        
                    end                                                                                       
                    if 17@ == 3                                                                               
                    then 18@ = #sbfypro                                                                       
                    end                                                                                       
                    if 17@ == 4                                                                               
                    then 18@ = #sbfypro                                                                       
                    end                                                                                       
                    if 17@ == 5                                                                               
                    then 18@ = #sbfypro                                                                       
                    end                                                                                       
                                                                                                              
                    if 8431:   not car 5@ passenger_seat_free 0@                                              
                    then 0432: 7@ = get_actor_handle_from_car 5@ passenger_seat 0@                             
                        if 056D:   actor 7@ defined                                                           
                        then                                                                                  
                            actor.RemoveReferences(7@)                                                        
                            actor.DestroyInstantly(7@)                                                        
                            11@ = Actor.CreateAsPassenger(cop, 18@, 5@, 0@)                                   
                            077A: set_actor 11@ acquaintance 4 to_actors_pedtype 0 // see ped.dat             
                            0AB3: 445 > 11@ //SEND HANDLER
                            0AB1: call_scm_func @startNewThread 1 labelName @COPS_HANGE_2                           
                            22@++                                                                             
                        end                                                                                   
                    end                                                                                       
                end                                                                                           
            end                                                                                           
        end
    else
        0209: 17@ = random_int_in_ranges 1 5 
        if 17@ == 1                                           
        then 18@ = #bfypro                                    
        end                                                   
        if 17@ == 2                                           
        then 18@ = #hfypro                                    
        end                                                   
        if 17@ == 3                                           
        then 18@ = #sbfypro                                   
        end                                                   
        if 17@ == 4                                           
        then 18@ = #sbfypro                                   
        end                                                   
        if 17@ == 5                                           
        then 18@ = #sbfypro                                    
        end                                                   
        04C4: store_coords_to 1@ 2@ 3@ from_actor 4@ with_offset 0.0 0.0 -1.0
        19@ = actor.Angle(4@)
        actor.RemoveReferences(4@)
        actor.DestroyInstantly(4@)
        11@ = actor.Create(cop, 18@, 1@, 2@, 3@)       
        actor.Angle(11@) = 19@
        05DE: AS_actor 11@ walk_around_ped_path
        077A: set_actor 11@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
        0AB3: 444 > 11@ //SEND HANDLER
        0AB1: call_scm_func @startNewThread 1 labelName @COPS_HANGE_1        
    end
    :continuet
end

WAIT 0
WAIT 0
0661: NOP "======================================================================" 
0661: NOP "                                   THREAD      " 
0661: NOP "======================================================================" 
WAIT 0
WAIT 0

:COPS_HANGE_1  
  // This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}
0000:

0AB4: 1@ < 444
0AC6: 0@ = label @1handle offset                               
0A8C: write_memory 0@ size 4 value 1@ virtual_protect 0

WHILE TRUE
    WAIT 0
    0AC6: 0@ = label @1handle offset
    0A8D: 1@ = read_memory 0@ size 4 virtual_protect 0
    IF 1@ > 0
    JF continue
    IF 056D:   actor 1@ defined   
    JF continue
    if OR
        actor.Dead(1@) 
        80F2:   actor 1@ near_actor $PLAYER_ACTOR radius 80.0 80.0 0
    THEN GOTO @1CLEAN                                                                                                                          
    END
END 

:1CLEAN
Actor.RemoveReferences(1@)
END_THREAD

:1HANDLE
HEX
00 00 00 00
END

:COPS_HANGE_2
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}
0000:

0AB4: 1@ < 445
0AC6: 0@ = label @2handle offset                               
0A8C: write_memory 0@ size 4 value 1@ virtual_protect 0

WHILE TRUE
    WAIT 0
    0AC6: 0@ = label @2handle offset
    0A8D: 1@ = read_memory 0@ size 4 virtual_protect 0
    IF 1@ > 0
    JF continue
    IF 056D:   actor 1@ defined   
    JF continue
    if OR
        actor.Dead(1@) 
        80F2:   actor 1@ near_actor $PLAYER_ACTOR radius 80.0 80.0 0
    THEN GOTO @2CLEAN                                                                                                                          
    END
END 

:2CLEAN
Actor.RemoveReferences(1@)
END_THREAD

:2HANDLE
HEX
00 00 00 00
END


WAIT 0
WAIT 0
0661: NOP "======================================================================" 
0661: NOP "                                   THREAD      " 
0661: NOP "======================================================================" 
WAIT 0
WAIT 0

:COPS_HANGE_3
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}
0000:

0AB4: 1@ < 446
0AC6: 0@ = label @3handle offset                               
0A8C: write_memory 0@ size 4 value 1@ virtual_protect 0

WHILE TRUE
    WAIT 0
    0AC6: 0@ = label @3handle offset
    0A8D: 1@ = read_memory 0@ size 4 virtual_protect 0
    IF 1@ > 0
    JF continue
    IF 056D:   actor 1@ defined   
    JF continue
    if OR
        actor.Dead(1@) 
        80F2:   actor 1@ near_actor $PLAYER_ACTOR radius 80.0 80.0 0
    THEN GOTO @3CLEAN                                                                                                                          
    END
END 

:3CLEAN
Actor.RemoveReferences(1@)
END_THREAD

:3HANDLE
HEX
00 00 00 00
END